<?php

Class Test extends Controller
{
    public $sample_var  = 'you can use $this->variable from view';    
    public $sample_var2 = 'you can use $this->variable from model';    

    function __construct()
    {   
        parent::__construct();
        parent::__user();                  
                                            
        loader::base('session');    
        loader::helper('dropdowns');      // load helper from /application/ directory
        loader::base_helper('form');     // load helper from /base directory  
        
        // loader::lang();  
        // loader::base_lang();  
    }                               
    
    function index()
    {                        
        $options = test_dropdown();
        echo form_dropdown('test_dropdown',$options,1);

        $this->title_tag = 'Im the Test Controller !';
        $this->body_tag  = 'Hello World !';
    
        loader::base_view('view_base');
    }
    
    function run()
    {
        echo ob::uri_string();
    
        //loader::library('mylibrary');  
        //$this->mylibrary->platform();  
          
        $this->head_tag = loader::base_css('example');
        $this->head_tag.= loader::base_js('jquery');
        $this->head_tag.= loader::script('test');
          
        $this->title_tag = 'Im the Test2 Controller !';  
        
        echo '<br />Run function succesfully works.<br /><br />';
        
        $data['sample_array'] = array('1','2','3','4','5');
        $data['example_var']  = 'Hello World!';
        
        $data['sample_array2'] = array('6','7','8','9','19'); 
        $data['example_var2']  = 'Hello Cruel World!';

        $this->body_tag = loader::view('view_test',$data);
        loader::base_view('view_base');
    }
        
} //end of the class.
  
  
?>
